package com.file.manage.domain.entity;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.file.manage.domain.enums.FileType;
import com.file.manage.infrastructure.base.entiry.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 文件表
 * </p>
 *
 * @since 2025-05-22
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@Schema(title = "文件表")
@TableName("file")
public class File extends BaseEntity<File> {
    @Schema(title = "文件名称")
    private String name;

    @Schema(title = "父级id")
    @TableField(updateStrategy = FieldStrategy.ALWAYS)
    private String parentId;
    @Schema(title = "类型")
    private FileType type;

    @Schema(title = "文件地址")
    private String fileUrl;

    @Schema(title = "是否锁定")
    private Boolean isLock;
    @Schema(title = "删除标记")
    private Boolean delTag;

}
